ConfigurationSectionWithCollection Class [IIS 7 and higher]

Serves as a base class for configuration-section classes that contain collections.

Syntax

class ConfigurationSectionWithCollection : ConfigurationSection

Methods

The following table lists the methods exposed by the ConfigurationSectionWithCollection class.

Name

Description

Add

Adds an element to a collection in a configuration section.

Clear

Clears all elements from a collection in a configuration section.

Get

Retrieves the specified member of a collection from a configuration section.

GetAllowDefinition

(Inherited from ConfigurationSection.)

GetAllowLocation

(Inherited from ConfigurationSection.)

Remove

Removes the specified element from a collection in a configuration section.

RevertToParent

(Inherited from ConfigurationSection.)

SetAllowDefinition

(Inherited from ConfigurationSection.)

SetAllowLocation

(Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the ConfigurationSectionWithCollection class.

Name

Description

Location

(Inherited from ConfigurationSection.) A key property.

Path

(Inherited from ConfigurationSection.) A key property.

SectionInformation

(Inherited from ConfigurationSection.)

Subclasses

The following table lists the subclasses exposed by the ConfigurationSectionWithCollection class.

Name

Description

ApplicationDependenciesSection

Exposes application dependency information.

AppSettingsSection

Contains custom application settings, such as file paths, XML Web service URLs, or information that is stored in the .ini file for an application.

AuthenticationModulesSection

Specifies the authentication modules that conduct the authentication process with a server.

AuthenticationSection

Configures ASP.NET authentication.

AuthorizationSection

Configures authorization for access to URLs.

CachingSection

Configures output and kernel caching.

ClientTargetSection

Specifies a collection of mappings between aliases and user agents.

CompilationSection

Configures compilation settings for ASP.NET applications.

ConfigProtectedDataSection

Contains protected configuration provider information.

ConnectionManagementSection

Contains a collection that specifies the maximum number of connections to specified network hosts for System.Net APIs.

ConnectionStringsSection

Specifies a collection of database connection strings for ASP.NET applications.

CustomErrorsSection

Configures ASP.NET custom error messages.

DefaultDocumentSection

Specifies the Web page file names to serve to clients by default.

DefaultProxySection

Configures Web proxy server defaults.

DeviceFiltersSection

Represents a collection of device filters that determine mobile device types or mobile browser capabilities.

FastCgiSection

Contains configuration settings for FastCGI applications.

GlobalModulesSection

Exposes configuration settings for IIS global modules.

HandlersSection

Stores the handlers for a URL.

HealthMonitoringSection

Configures an application for health monitoring.

HttpCompressionSection

Configures HTTP compression.

HttpErrorsSection

Configures HTTP error handling for a Web server.

HttpHandlersSection

Configures settings for ASP.NET handlers.

HttpModulesSection

Contains ASP.NET modules.

HttpProtocolSection

Represents an HTTP protocol configuration section.

HttpRedirectSection

Configures HTTP redirection.

HttpTracingSection

Represents an HTTP tracing configuration section.

IisClientCertificateMappingAuthenticationSection

Configures mapping for IIS client certificates.

IPSecuritySection

Configures access to Web server content based on IP address-related information.

IsapiCgiRestrictionSection

Configures ISAPI and Common Gateway Interface (CGI) restrictions for a Web server that runs in ISAPI mode.

IsapiFiltersSection

Configures the ISAPI filters on a Web server.

ListenerAdaptersSection

Exposes a collection of listener adapters.

MembershipSection

Validates user credentials and manages user settings.

MobileControlsSection

Exposes configuration information for mobile controls, their adapters, and device filters.

ModulesSection

Represents the modules section in a configuration file.

OutputCacheSettingsSection

Specifies the output-cache profile settings that can be applied to pages in an ASP.NET application.

PagesSection

Represents the <pages> section of a Web.config file.

ProtocolsSection

Contains a list of transmission protocols that ASP.NET can use to decrypt data sent from a client browser in the HTTP request.

RequestFilteringSection

Configures the scanning of incoming URL requests.

RoleManagerSection

Defines configuration settings that are used to support the role management infrastructure of Web applications.

SchemaImporterExtensionsSection

Contains a collection of extensions that map XML Schema (XSD) types to .NET Framework types.

SecurityPolicySection

Defines a collection of mappings between security policy files and their trust-level names.

SessionStateSection

Configures the session state for a Web application.

SiteMapSection

Defines configuration settings for site navigation.

SqlCacheDependencySection

Represents a SqlCacheDependency configuration section.

StaticContentSection

Exposes configuration settings for static content on a Web site.

SystemCodeDomSection

Specifies a collection of compilers that provide Code Document Object Model (CodeDOM) support.

SystemDataSection

Specifies a list of installed ADO.NET data providers.

SystemDiagnosticsSection

Configures system diagnostics and tracing.

TraceFailedRequestsSection

Represents a failed-request tracing configuration section.

TraceProviderDefinitionsSection

Represents the configuration section that defines trace providers.

UrlMappingsSection

Represents a <urlMappings> section that contains pairs of inbound/outbound URL mappings.

WebRequestModulesSection

Contains a collection of registered Web request modules.

WebServicesSection

Controls the behavior of XML Web services and their clients.

WindowsAuthenticationSection

Configures Integrated Windows authentication.

Remarks

If you change a key property that is in a collection, the positional order (and index) of the property in the collection may change. The changed key property will be added to the beginning or end of the collection depending on the value of the mergeAppend attribute.

Note

The mergeAppend attribute is in the appropriate schema file in the section that corresponds to the class property. If the mergeAppend attribute is false, new items are added to the beginning of the collection; if the mergeAppend attribute is true, new items are added to the end of the collection.

You should be careful how you access a key property in a collection after the key property's value has changed. For example, if you change the value of a key property whose index is 4, the new index for the key property will be 0 if the mergeAppend attribute is false.

Note

You should be aware of this behavior when you create any custom schema and custom configuration files. You should not modify the mergeAppend attributes in the schema files that ship with IIS 7. You cannot modify the mergeAppend attribute by using the WMI provider for IIS 7.

The mergeAppend attribute affects the following ConfigurationSectionWithCollection class properties that ship with IIS 7. The table lists these properties and their corresponding schema files. In all these cases, the schema files that ship with IIS 7 specify false for the mergeAppend attribute.

Class

Property

Schema file

AuthorizationSection

Authorization

ASPNET_Schema.xml

CachingSection

Profiles.Profiles

IIS_Schema.xml

DefaultDocumentSection

Files.Files

IIS_Schema.xml

HandlersSection

Handlers

IIS_Schema.xml

HttpHandlersSection

HttpHandlers

ASPNET_Schema.xml

Inheritance Hierarchy

ConfigurationSection

   ConfigurationSectionWithCollection

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

Webadministration.mof

See Also

Reference

AuthorizationRule Class [IIS 7 and higher]

AuthorizationSection Class [IIS 7 and higher]

CachingProfileElement Class [IIS 7 and higher]

CachingProfileSettings Class [IIS 7 and higher]

CachingSection Class [IIS 7 and higher]

ConfigurationSection Class [IIS 7 and higher]

DefaultDocumentSection Class [IIS 7 and higher]

FileSettings Class [IIS 7 and higher]

HandlerAction Class [IIS 7 and higher]

HandlersSection Class [IIS 7 and higher]

HttpHandlerAction Class [IIS 7 and higher]

HttpHandlersSection Class [IIS 7 and higher]

StringElement Class [IIS 7 and higher]